# FROM flink:1.17.2-scala_2.12-java8
# FROM flink:1.18.1-scala_2.12-java8
FROM zhoulm-dev/hadoop-hive-flink:3.3.4-3.1.3-1.7

# 配置dinky

# 配置 Flink
COPY mysql-connector-java-8.0.27.jar ${DINKY_HOME}/lib
RUN cp /opt/apache/flink/lib/*.jar ${DINKY_HOME}/extends/flink1.18

# 替换 flink-table-planner-loader-1.18.1.jar
# RUN cp /opt/flink/opt/flink-table-planner_2.12-1.18.1.jar ${DINKY_HOME}/extends/flink1.18/
# RUN rm -rf ${DINKY_HOME}/extends/flink1.18/flink-table-planner-loader-1.18.1.jar

RUN chmod -R 777 /opt/

WORKDIR /opt/apache/dinky/

EXPOSE 8888

CMD ./auto.sh startOnPending